import { getMenuList } from "@/request/api";
const state = {
    menulist:[]
};
const getters = {
    getMenu(state){
        return state.menulist;
    }
}
const mutations = {
    REQ_MENULIST(state,payload){
        state.menulist = payload
    }
}
const actions = {
    getMenuAction({commit}){
        getMenuList().then((res)=>{
            commit('REQ_MENULIST',res.list)
        })
    }
}
export default{
    state,
    getters,
    mutations,
    actions,
    //命名空间
    namespaced:true
}